package com.fandy.struts.DAL;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.fandy.struts.SqlAccess.SqlServerHelper;
import com.fandy.struts.SqlStatement.Outgoing;


public class DALOutgoing {
 
 Outgoing og = new Outgoing();
	
 SqlServerHelper ssh = new SqlServerHelper();

	public   ResultSet  getAll()
	{
		return   ssh.executeScalar(og.getAll());
	}
	
	public   ResultSet getOutInfoByID(int ID)
	{
		return  ssh.executeScalar(og.getOutInfoByID(ID));
	}
	
	
	public int Add(com.fandy.struts.Model.Outgoing ogg) throws SQLException
	{
		
		return  ssh.executeNoQuery(og.Add(ogg));
		
	}
	
	
	public int UpdateByID(int id,com.fandy.struts.Model.Outgoing ogg) throws SQLException
	{
		
		return  ssh.executeNoQuery(og.UpdateByID(id, ogg));
	}
	
	public int DeleteByID(int id) throws SQLException
	{
		
		return ssh.executeNoQuery(og.DeleteByID(id));
		
	}
	
	
	
}

